{{- if .Site.Params.searchBar }}
  {{- $page := .Site.GetPage "/search" }}
  {{- if ne $page.RelPermalink .RelPermalink -}}
    {{- $shortcut := partialCached "functions/search-shortcut" . }}
    <hr class="d-xxl-none">
    <form class="search-bar ms-auto" action="{{ with $page }}{{ .RelPermalink }}{{ end }}" novalidate>
      <div class="input-group input-group-sm align-items-center">
        <span class="btn btn-search disabled position-absolute left-0 border-0 px-1">
          <i class="fas fa-fw fa-search fa-lg"></i>
        </span>
        <input
          class="my-1 form-control border-white rounded-5 search-input bg-body"
          name="q"
          type="search"
          placeholder="{{ i18n `search` }}"
          aria-label="Search"
          required>
          {{- with $shortcut }}
          <span class="search-shortcut position-absolute end-0 top-0 me-2">
            {{- range . }}
            <kbd class="bg-primary rounded shadow">{{ . }}</kbd>
            {{- end }}
          </span>
          {{- end }}
      </div>
    </form>
  {{- end }}
{{- end -}}
